Blog search

Friday Facts #168 - Nightvision Nightmare

Posted by Posila on 2016-12-09

Nightvision nightmare As Twinsen continues tweaking the combat, he started to complain about the “green fog” effect that is applied during night when the player’s character has nightvision goggles equipped. Nightvison in 0.14 works in a way that it reduces the darkness of night, and then draws a transparent green overlay. This washes out the colors, reduces contrast, and makes the picture pretty unpleasant to look at. The first idea was to just make the green overlay be rendered around light sources, to reward players who put lights into their bases, by not making the base look worse with nightvision on. This didn’t look too good, and as we were trying to figure out how to improve it, other developers, especially artists, caught on to what we were doing, and started to provide their own ideas. Next we tried to darken only the red and blue channels when nightvision is on. This will make the picture green without losing contrast and we can drop the green overlay. We kept “not applying effect onto lighted area” logic and it started to look interesting. Albert wasn’t happy with the result though, so we continued experimenting. We added a soft green tint to lighted areas, and a bright green glow onto the transition between light and darkness. Then we added white highlights to light sources and it finally started to pleasant to look at. We will stick with this version for time being, but plan to work on it more. We can’t agree if this change is for better or worse even inside the team. It seems everybody has their own idea about how nightvision effect should look like and what benefits it should provide to players. For example it would be nice to have goggles with greyscale effect that would highlight biters. So maybe heat vision?

Friday Facts #174 - Mod gui

Posted by Klonan on 2017-01-20

Hello, a wave of illness has afflicted the team these last few weeks, but things are starting to pick up again. With the collective health of the office back to normal, progress is advancing well on the features for 0.15.

Friday Facts #167 - Reactors Operational

Posted by Klonan on 2016-12-02

Hello, Denis has joined us for another month here in the office, a small overlap with Rseding who is flying back to the USA next week. With the festive season upon us, Tomas and Kovarex have both taken some time off for a vacation.

Friday Facts #18

Posted by Tomas on 2014-01-24

Hello, today the Factorio Friday Facts turn 18. That is considered an age of maturity in many countries. So the glass of Jagermeister on my desk is completely justified :) The time here in Prague feels just like whooshing around us faster and faster with the end of January approaching rapidly. That was the original estimate for the release of 0.9 but now it seems that it will take a week or two more. The usual "everything takes longer than expected" has applied this time as well. The current development version has placeholders for some new entities (like a plain rectangle box saying "oil refinery" or another one with "chemical plant") and we really want to make proper graphics for these and deliver the basics of new oil content as a whole package. Recently we got a bug report claiming that the game is too slow. The guy who posted it was right, the game was running well under 60fps. In our defence it needs to be added that his factory was pretty monstrous. It was actually the biggest one we have seen by far. Just to get an idea, his factory had 9000 solar panels, 15 000 laser turrets and thousands of logistic robots. So kovarex took it as a challenge to squeeze as much performance from the engine as possible taking this save as a reference. He has been working on it for the past couple of days. The most significant optimizations he made are: Efficient dispatch of pending logistic robots. This was probably the cause of the biggest slowdown in the given save. Wake-on-demand mechanism for inserters. Until now the inserters always asked every tick the objects in front of / behind itself whether they should transfer anything. Now, instead they put themselves to sleep and the object wakes them up when its state changes (that means there is a chance a transfer will be required). Improved cache locality for the electric energy network. The result: game update dropped from roughly 30 milliseconds per 1 update to about 10 milliseconds (and there is more to come). Of course not everybody will get this amount of performance improvement (the optimizations are aiming at the game update for big factories). But in general this batch of improvements pushes the bar for the size of the factory further up. The work on the oil industry has entered the last phase. The fluid and recipe mechanisms as well as new entities are ready and now it is all about adding the actual content. I have been studying the oil refining process quite a bit recently and also I took this opportunity to refresh some bits from my high school chemistry curriculum. The way it shapes now the oil industry will be a middle to late game resource. Its usage will start somewhere between the green and blue science pack and its products will cover a variety of areas (fuel, plastics, lubricants, explosives, etc.). There has been quite some discussion about the oil industry on the forums. If you are interested and want to contribute your opinion you can do so in this thread for instance. Kuba and Albert have been working together a bit on the integration of the new doo-dads into the map generator. The goal is to approach the scenery compositions shown in the previous posts . Though that is difficult (because those compositions are hand made and imho very good) the doo-dads should greatly improve the current flatness of the landscape anyway. On top of this Kuba has been busy with a neat feature when the game will natively treat zip archives as directories (so the saves / mods can be zip packages). And of course Albert's table is full of "oily stuff" - now comes the interesting part - the oil mining drill, the oil refinery and the chemical plant. Today's picture is a glimpse into the internals of Factorio. The screenshot shows a diagram of entities' (objects on the map) class inheritance structure generated by doxygen. If you feel like expressing your opinion regarding anything above then go ahead and do so on our forum.

Friday Facts #32 - The New Trailer

Posted by Tomas on 2014-05-02

Hello everyone, so it is kind of obvious what the main topic of today's post will be. After months of waiting, the new trailer went public on Thursday (on time - YAY). Michal and Albert were working till like 5 a.m. to finish all the super final details, record the trailer and post it on youtube. Still we were unsure about the final result. The quality of the video is unsatisfactory compared to the original (Youtube recompresses the video) and we keep seeing more and more tiny little errors in the trailer - things like bad timing of honking when the train leaves the sorter, too close zooming now and there, one of the biters being rendered "inside the worm", clash sound on the bridge played a bit too early. So we monitored the reactions rather anxiously. And we were overwhelmed. Positively. The trailer video got over 10k views the same day with couple of hundreds likes and many, many positive and encouraging comments. On top of that the trailer was posted on Reddit in r/Games and it got quite a bit of traction there as well. We received lots of great emails, tweets and the sales spiked significantly. And the cherry-pick is that today we got emails from guys at Gamasutra and PC Gamer UK who were interested in getting a copy of the game for potential articles / previews on these sites. So looks like the new trailer is doing its job:) Big thank you to all of you who contributed to this (by giving advice on trailer concept, spreading the word, liking, tweeting, etc.). Maybe a little bit in the shadows of the new trailer comes the new Factorio logo (you can see it in the trailer as well as on the website). Quite a while ago we made a post which introduced our new logo prototype. This post was followed by a fruitful discussion on the forums. We took the major points from those discussions and put them into the new logo. That means we (and by "we" I mean Albert:)) fixed the shape a bit, added a more fitting texture and finally got a better ending wheel. We are really happy about the result. The old logo is gone long live the new one:) (we will update the wiki and forums soon ...). By the end of the next week we will finish with some more "marketing / PR karma" steps. Things like: Direct debit card payments. Don't have a Paypal account? No worries, you will be able to buy the game with a single "swipe" of your card. Up to date screenshots with latest graphics (it is a pain to see new articles about Factorio popping up with half a year old screenshots). New css template for the forums (including the new logo). Further web polish - adding links to couple of good youtube preview videos about Factorio, maybe adding some logo resources for people to use when previewing the game, etc. This will finally bring us to the state when we will be positive about trying to reach to the wider audience. Oh yeah and apart from refreshing the youtube trailer page and scraping internet for feedback on the trailer we did some "regular work" as well. Namely for the multiplayer. The basics of synchronization layer, connection management and data transfers are in place. They haven't yet been tested together though - we are too afraid the whole thing will just explode - so for now we are writing tests for these like crazy. The next in line are lobby (to actually get players together and start / join the game) and changing the core game to properly deal with multiple players. After this we will hopefully start with some very early tests here over LAN. We will keep you up to date;) I guess you all noticed, but there is a new steam engine graphics in the trailer. Albert said that we can't release the trailer with the old one so we listened. And it was imho a good decision. Checkout some gif animations from early vs. final version below: And as always, go to our forums for the Friday Facts "afterparty" comments.

Friday Facts #123 - Better Circuit Network II

Posted by Robert on 2016-01-30

Hello, Robert here again. It's time for the information I teased about in the previous Friday Facts edition.

Friday Facts #203 - Logistic buffer chest

Posted by kovarex & Klonan on 2017-08-11

Further optimisations I finished the item stack optimisations mentioned in FFF-198, and was able to do some performance tests. First I tested how many stacks on a big map actually need to use an externally allocated object (Item), and how many of them are plain. On the huge map I tested, it turned out that only 36K out of 1M stacks need the Item object. These were mainly science packs, as they need it for the progress of how used-up they are (and now when I think about it, it could also be omitted by only using the objects for science packs that are partially used up already). Overall factory performance was increased approximately 2% by this. It is nothing huge, but every bit matters. One of the programmer that has read access to the code (Zulan), came up with a pull request that improves performance in Factorio by prefetching memory in the update loops ahead. The problem when normally updating objects is, that CPU asks for memory representing the object. The memory is slow, at least compared to the CPU cache or the CPU speed. The memory transfer speed itself is not that slow, but the waiting (latency) time between ordering and receiving it is. This means, that what very often happens is, that CPU orders data of next entity from the memory, then it waits for quite a long time to get it, and then it does its logic. The memory prefetching partially solves it by doing this: Order data of the next entity from memory (prefetch) Do the logic of the current entity in the meantime Go back to start The overall measured performance improvements vary between 9-12%, which is certainly a nice addition.

Friday Facts #320 - Color correction

Posted by Albert, V453000 on 2019-11-08

Color correction Albert, V453000 Factorio is in a state that even though is not yet finished, it is very close to its 1.0 version. That means that most of the work is done and we are polishing the game in order to make it bright. That's what we've been doing for the past 2 weeks. Literally making it bright. Since years I wanted to do this post-production work. But I didn't dare to do it until most of the graphics were finished. I was afraid of breaking the consistency of the look and our production pipeline. Now it's different. There's only a couple of entities to re-design and some other stuff to do, but in general this missing details are not affecting the possibility of working in the post-production. Factorio is a dark game. I mean conceptually. All these things about industrializing a planet, polluting an entire world just for the sake of the factory, and killing all its inhabitants are not precisely happy concepts full of light. This old article could explain better my thoughts regarding this concept. But the look of the game was dark, too dark. So we cleaned it up without betraying its spirit. Like restoring an old painting. The difference can be subtle, but very effective. We added more light, and a little bit of color saturation. Adding these general changes to the entire sprites collection is not an easy task. Many sprites were badly affected by this general correction. V453000 was fixing individually the broken sprites and icons in order to keep the consistency with the new context. We took the chance to work on the terrain a bit further. Not only this color correction was applied, but the contrast and integration with other terrains was also improved. Also experimenting with the color of the trees, trying to achieve a more colorful feeling with the excuse of an alien planet. I have to say the Alien Biomes mod was opening my mind - a little - to experiment with the color a bit further. In order to break this general brown feeling, we added a more orange tonality to the sand biome. Here is where you can see the difference more. Going further to too saturated colors is dangerous, after all, the terrain is a background that should provide a good and comfortable contrast with the entities and the icons. Touching terrain colours means touching map colors also. We were very keen to keep the visibility of the map information and the similarity with the terrain. The result is a more vibrant look in the entire game. We tweaked the night also. Thanks to posila and Wheybags, we can use LUTs (Look up tables) to dynamically modify the colors. Instead of playing with the alpha channel of a solid black layer on top of the game. Now we can gradually move to a different color palette for night with more control. So the colors are losing their saturation and becoming more blue and cold. This is important, because part of the annoying darkness of the game comes from this black layer. We are still experimenting with this LUT, and the transitions of day/night cycles. I'm pretty sure also that I will have to touch the map colors for some missing details and fine tuning. Possibly there is some entity that is not in its best shape with these new color palettes, and maybe we keep tweaking the terrain. But I feel very confident with these additions and I'm very sure that these changes will improve the experience of playing Factorio. After playing with these colors, the feeling is good. I hope you see it the same way.

Friday Facts #152 - Team production challenge

Posted by kovarex on 2016-08-19

Hello, it has been quiet here the last week, Rseding is back in America, Albert is in Spain, and some people have holidays. I have been programming until 9:30pm and then I realized I have to write Friday Facts, so it is going to be shorter today, although this happens quite often to me.

Friday Facts #330 - Main menu and File Share Shenanigans

Posted by Twinsen, wheybags on 2020-01-17

The main menu rework Twinsen Up until I looked at the source code, I was always confused about the differences between "Start campaign", "New game" and "Scenarios". New game seems like the same thing as "Scenarios"->"Freeplay", but are there any differences? We then later added a few more bonus scenarios, but they are hidden in the scenarios menu, with no explanation about what each is, what to expect or if it works in multiplayer. I believe it's very important to communicate to new players information about the game's content. It's also important to show that freeplay is the intended way to play. So all this prompted me to rework the main menu a bit. I started with the structure. The structure always seemed odd to me, compared to what I'm used to from other games. Important options like "Load game" are lost among options that are never used (like "Replay game"). So I came up with a new structure. It looks like this: Continue Single player New game Load game Multiplayer Host new game Host saved game Browse public games Browse LAN games Connect to address Map Editor New scenario Convert save Settings ... Mods About The first new thing to notice is the "Continue" button. Since "start the game and continue my last save" is probably the most common thing players will do, it makes sense that there is an option for this right at the top of the main menu. The button will contain the name of your latest save. Pressing it will immediately load the game and get you in game. Due to implementation complications, for now it only handles save games and it will NOT connect you to the last server you played on if your last play session was multiplayer, but I might implement that if it's highly requested. Next, everything was grouped into either Single player or Multiplayer. There are much fewer options, since "Replay game" was moved as a small button in "Load Game", and every way to start playing the game was moved to the new "New Game" GUI. The "New game" GUI shows all the ways to play the game. It also groups them nicely, places freeplay on top, shows a description and even a nice image. This GUI is used for new game, multiplayer hosting and map editor, thus simplifying the menu quite a bit. For modders, scenarios can now contain a description.json file. In the file "order" determines the sorting in the New Game GUI; "multiplayer-compatible" determines whether the scenario is shown when trying to host multiplayer games. "multiplayer-compatible" was added to description.json file of campaigns also.